//钟
var sec = document.getElementById("sec");
var min = document.getElementById("min");
var hr = document.getElementById("hr");
setInterval(clock, 1000);
function clock() {
    var secs = (new Date()).getSeconds() * 6;
    var mins = (new Date()).getMinutes() * 6;
    var hrs = (new Date()).getHours() * 30;
    sec.style.transform = "rotate(" + secs + "deg)";
    min.style.transform = "rotate(" + mins + "deg)";
    hr.style.transform = "rotate(" + hrs + "deg)";
}
//专升本
// 1684512000是2023年5月20日的凌晨时间戳
setInterval(info, 1000);
function info() {
    var timestamp = 1684512000 - ((new Date()).valueOf() - ((new Date()).valueOf() % 1000)) / 1000;
    var days = Math.floor(timestamp / 60 / 60 / 24)
    document.getElementById("days").innerHTML = days;
    var hours = Math.floor((timestamp - days * 24 * 60 * 60) / 60 / 60);
    document.getElementById("hrs").innerHTML = hours;
    var mins = Math.floor((timestamp - (days * 24 * 60 * 60) - (hours * 60 * 60)) / 60);
    document.getElementById("mins").innerHTML = mins;
    var secs = timestamp - (days * 24 * 60 * 60) - (hours * 60 * 60) - (mins * 60);
    document.getElementById("secs").innerHTML = secs;
}
//毫秒装饰
var num = 99;
setInterval(ms, 1);
function ms() {
    document.getElementById("ms").innerHTML = num;
    num--;
    if (num == 10) {
        num = 99;
    }
}
//激励和毫秒显示
var h1 = document.getElementsByTagName("h1")[2].onclick = function fct() {
    document.getElementsByTagName("h1")[3].style.display = "inline-block";
    document.getElementById("ms").style.display = "block";
}
//跳转到博客说明页
var slogan = document.getElementById("slogan");
var num_egg = 0;
slogan.onclick = egg;
function egg() {
    num_egg = num_egg + 1;
    console.log(num_egg);
    if (num_egg == 3) {
        window.location.href = "/MyBlog/explain_wp/index.html";
    }
}
//长风破浪会有时
var wave = document.getElementById("wave");
wave.onclick = function () { wave.innerHTML = "长风破浪会有时,直挂云帆济沧海"; };